If you want to say OR use double pipe ( || ). if [ "$fname" = "a.txt" ] || [ "$fname" = "c.txt" ]. (The original OP code using | was simply piping the ... ... <看更多>
Shell script multiple if else statements · Just like with Java or C#, you can have a single else or a series of else-if constructs with an if , ... ... <看更多>